import numpy as np
import json
import os

def create_demo_files():
    # 确保demo_datas目录存在
    if not os.path.exists('demo_datas'):
        os.makedirs('demo_datas')
    
    # 创建10个文件
    for i in range(1, 11):
        # 生成随机数组，形状为(1, 50, 14)
        data = np.random.randint(0, 100, size=(1, 50, 14))
        
        # 将numpy数组转换为列表
        data_list = data.tolist()
        
        # 创建文件名
        filename = f'demo_datas/demo{i:02d}.json'
        
        # 将数据写入JSON文件
        with open(filename, 'w') as f:
            json.dump(data_list, f)
        
        print(f'Created {filename}')

if __name__ == '__main__':
    create_demo_files() 